<template>
  <el-form inline size="small">
    <el-form-item label="时间步长">
      <el-radio-group v-model="seatStore.historyView.summaryConfig.stepMinutes">
        <el-radio-button
          v-for="item in stepMinutesOptions"
          :value="item.value"
          :label="item.label"
          :key="item.label"
        />
      </el-radio-group>
    </el-form-item>

    <el-form-item label="取值类型">
      <el-radio-group v-model="seatStore.historyView.summaryConfig.valueType">
        <el-radio-button
          v-for="item in valueTypeOptions"
          :value="item.value"
          :label="item.label"
          :key="item.label"
        />
      </el-radio-group>
    </el-form-item>
  </el-form>
</template>

<script setup>
import { ref, computed, watch, onMounted, onUnmounted } from "vue";

import { ElLoading } from "element-plus";

import useSeatStore from "@/store/seat.js";
const seatStore = useSeatStore();

const stepMinutesOptions = [
  {
    label: "15分钟",
    value: 15,
  },
  {
    label: "30分钟",
    value: 30,
  },
  {
    label: "60分钟",
    value: 60,
  },
];

const valueTypeOptions = [
  {
    label: "最大值",
    value: "max",
  },
  {
    label: "最小值",
    value: "min",
  },
  {
    label: "平均值",
    value: "avg",
  },
  {
    label: "加权值",
    value: "weighted",
  },
];
</script>
